<template>
  <div>
    <StoreInfo :store="storeData" />
  </div>
</template>

<script>
import StoreInfo from './StoreInfo.vue'

export default {
  components: {
    StoreInfo
  },
  created() {
    this.initializeStoreData();
  },
  methods: {
    initializeStoreData() {
      const shop = this.$route.params.shop;
      console.log("shop"+shop)
      if (shop) {
        this.storeData = shop;
      }
    }
  },
  data() {
    return {
      storeData: {
        image: '',
        supplierName: '',
        description: '',
        address: '',
        supplierId:'',
        lat:'',
        lng:'',
        rate:''
      },
      products: []
    };
  }
};
</script>
